//
//  File.swift
//  麦兜直播
//
//  Created by yeqingyu on 16/9/25.
//  Copyright © 2016年 yeqingyu. All rights reserved.
//

import UIKit
import Kingfisher

let screenWidth = UIScreen.main.bounds.size.width
let screenHeight = UIScreen.main.bounds.size.height
let animationDuration = 0.25
let titleHeight:CGFloat = 50.0
let tabarHeight:CGFloat = 49.0
let naviBarHeight:CGFloat = 64.0


extension UIColor{
    // MARK:- 颜色扩展
    convenience init(r:CGFloat,g:CGFloat,b:CGFloat,a:CGFloat) {
        self.init(red: r / 255.0, green: g / 255.0, blue: b / 255.0, alpha: a)
        
    }
    
    class func getRandomColor()->UIColor{
        return UIColor(r: CGFloat(arc4random_uniform(256)), g: CGFloat(arc4random_uniform(256)), b: CGFloat(arc4random_uniform(256)), a:1)
    }

}



extension Date{
// MARK:- 日期扩展
    static func getCurrentTimestamp()->String{
        let during = Date().timeIntervalSince1970
        return "\(during)"
    }
}

